package com.ezhuan.task.pojo;

import java.util.Date;

import com.ezhuan.common.pojo.BasePojo;

public class ATask extends BasePojo<ATask>
{
	private int cateId;
	private String name;
	private String thirdSn ; 
	private String imgPath;
	private int price;
	private String packSize;
	private Date stDate;
	private Date edDate;
	private String brief;
	private String content;
	private int taskType;
	private int status;
	private Date createTime;
	private Date updateTime;
	private Date pubTime;
	
	/* 字符串描述 */
	private String taskTypeStr ; 

	public int getCateId()
	{
		return cateId;
	}

	public void setCateId(int cateId)
	{
		this.cateId = cateId;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getImgPath()
	{
		return imgPath;
	}

	public void setImgPath(String imgPath)
	{
		this.imgPath = imgPath;
	}

	public int getPrice()
	{
		return price;
	}

	public void setPrice(int price)
	{
		this.price = price;
	}

	public String getPackSize()
	{
		return packSize;
	}

	public void setPackSize(String packSize)
	{
		this.packSize = packSize;
	}

	public Date getStDate()
	{
		return stDate;
	}

	public void setStDate(Date stDate)
	{
		this.stDate = stDate;
	}

	public Date getEdDate()
	{
		return edDate;
	}

	public void setEdDate(Date edDate)
	{
		this.edDate = edDate;
	}

	public String getBrief()
	{
		return brief;
	}

	public void setBrief(String brief)
	{
		this.brief = brief;
	}

	public String getContent()
	{
		return content;
	}

	public void setContent(String content)
	{
		this.content = content;
	}

	public int getStatus()
	{
		return status;
	}

	public void setStatus(int status)
	{
		this.status = status;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

	public Date getPubTime()
	{
		return pubTime;
	}

	public void setPubTime(Date pubTime)
	{
		this.pubTime = pubTime;
	}

	@Override
	public String getTableName()
	{
		return "a_task";
	}

	public int getTaskType()
	{
		return taskType;
	}

	public void setTaskType(int taskType)
	{
		this.taskType = taskType;
	}

	public String getTaskTypeStr()
	{
		// 根据状态值获取字符串描述
		ATaskEnum[] taskEnums = ATaskEnum.values();
		for (int i = 0; i < taskEnums.length; i++)
		{
			ATaskEnum taskEnum = taskEnums[i];
			if (taskEnum.toString().startsWith("TASKTYPE_"))
			{
				// 表示是状态的标识
				if (taskEnum.getStatus() == this.getTaskType())
				{
					this.taskTypeStr = taskEnum.getName();
					break;
				}
			}
		}
		return taskTypeStr;
	}

	public String getThirdSn()
	{
		return thirdSn;
	}

	public void setThirdSn(String thirdSn)
	{
		this.thirdSn = thirdSn;
	}

}
